﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using VVA.Data.Service;
using VVA.Website.UI.Helper;
using VVA.Website.UI.Models;

namespace VVA.Website.UI.Controllers
{

    public class AboutController : BaseController
    {
        //
        // GET: /About/
        [OutputCache(Duration = 360, VaryByParam = "culture")]
        public ActionResult Index()
        {
            var service = new ArticleService();
            var model = service.GetAllByTaxonomySlug("ve-chung-toi", Culture);

            return View(model);
        }

        [OutputCache(Duration = 360, VaryByParam = "slug")]
        public ActionResult Detail(string slug)
        {
            var service = new ArticleService();
            var model = new AboutDetailModel();
            model.Article = service.GetBySlug(slug);
            model.Breadscrum = service.GetByExcludeSlug(slug, "ve-chung-toi");
            return View(model);
        }
    }
}
